<%--
  Created by IntelliJ IDEA.
  User: 任
  Date: 2020/1/14
  Time: 11:41
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>邮箱登录</title>
    <link href="/static/css/bootstrap-progressbar-3.3.4.min.css" type="text/css">
<style>
    /*模态框*/
    .modal-header .close {
        margin-top: -2px;
    }
    button.close {
        -webkit-appearance: none;
        padding: 0;
        cursor: pointer;
        background: 0 0;
        border: 0;
    }
    .close {
        float: right;
        font-size: 21px;
        font-weight: 700;
        line-height: 1;
        color: #000;
        text-shadow: 0 1px 0 #fff;
        filter: alpha(opacity=20);
        opacity: .2;
    }
    .modal-header .close span{
        vertical-align: sub;
    }
    .modal-header{
        font-size: 20px;
    }
    .btn{
        border-radius: 0;
    }
    .modal-footer .btn{
        padding: 5px 15px;
    }
    .modal-content{
        border-radius: 0;
    }
    .modal-footer{
        border-top: 0;
        padding-top: 0;
    }
    @media (min-width: 370px){
        .modal-dialog {
            width: 370px;
            margin: 30px auto;
        }
    }
    .modal-backdrop{
        background-color: #fff;
    }



    /*登录模态框*/
    h2, .h2 {
        font-size: 30px;
    }
    h1, h2, h3 {
        margin-top: 20px;
        margin-bottom: 10px;
    }
    h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
        font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
        font-weight: 500;
        line-height: 1.1;
        color: inherit;
    }
    .form-control {
        display: block;
        width: 100%;
        height: 34px;
        padding: 6px 12px;
        font-size: 14px;
        line-height: 1.428571429;
        color: #555;
        vertical-align: middle;
        background-color: #fff;
        background-image: none;
        border: 1px solid #ccc;
        border-radius: 0;
        -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
        box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
        -webkit-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
        transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
    }
    .btn-block {
        display: block;
        width: 100%;
        padding-right: 0;
        padding-left: 0;
    }
    .btn-lg {
        padding: 10px 16px;
        font-size: 18px;
        line-height: 1.33;
    }
    .radio, .checkbox {
        display: block;
        min-height: 20px;
        padding-left: 20px;
        margin-top: 10px;
        margin-bottom: 10px;
        vertical-align: middle;
    }
    .radio input[type="radio"], .radio-inline input[type="radio"], .checkbox input[type="checkbox"], .checkbox-inline input[type="checkbox"] {
        float: left;
        margin-left: -20px;
    }
    input[type="radio"], input[type="checkbox"] {
        margin: 4px 0 0;
        margin-top: 1px \9;
        line-height: normal;
    }
    input[type="checkbox"], input[type="radio"] {
        padding: 0;
        box-sizing: border-box;
    }
    .form-signin {
        max-width: 380px;
        padding: 15px 35px 45px;
        margin: 0 auto;
        background-color: #fff;
        border: 1px solid rgba(0, 0, 0, 0.1);
    }

    .form-signin .form-signin-heading,
    .form-signin .checkbox {
        margin-bottom: 30px;
    }

    .form-signin .checkbox {
        font-weight: normal;
        display: inline;
        margin: 0;
    }

    .form-signin .form-control {
        position: relative;
        font-size: 16px;
        height: auto;
        padding: 10px;
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
        box-sizing: border-box;
    }

    .form-signin .form-control:focus {
        z-index: 2;
    }

    .form-signin input[type="text"], .form-signin input[type="email"] {
        /*margin-bottom: -1px;*/
        margin-bottom: 15px;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }

    .form-signin input[type="password"] {
        margin-bottom: 20px;
        border-top-left-radius: 0;
        border-top-right-radius: 0;
    }

    /*登录注册内容切换*/
    .form-signin-actions{
        position: relative;
        margin: 10px 0 30px 0;
    }
    #login .switch{
        display: inline-block;
        float: right;
        cursor: pointer;
        position: absolute;
        top: 0;
        right: 0;
    }
    #login .switch:hover{
        color: #428bca;
        border-bottom-width: 1px;
        border-bottom-style: solid;
    }
</style>
</head>
<body>
<!-- 登录注册模态框 -->
<div class="modal fade" id="login">
    <div class="modal-dialog">
        <div class="modal-content">
            <form class="form-signin">
                <h2 class="form-signin-heading">请登录</h2>
<%--                <input type="text" class="form-control hidden" name="nickname" placeholder="昵称" required="" autofocus="" />--%>
                <input type="email" class="form-control" name="username" placeholder="邮箱" required="" autofocus="" />
                <input type="password" class="form-control" name="password" placeholder="密码" required=""/>
                <div class="form-signin-actions">
                    <label class="checkbox">
                        <input type="checkbox" value="remember-me" id="rememberMe" name="rememberMe"> 记住我

                    </label>
                  <a  href="/jsp/registemail.jsp"><span class="switch" >注册</span></a>
                </div>

                <button class="btn btn-lg btn-primary btn-block" type="submit">登录</button>
            </form>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div><!-- /.modal -->

<script type="text/javascript" src="/static/js/jquery-1.8.3.min.js"></script>
<script>
    // 判断用户是否登录
    // 如果未登录显示 "登录模态框"
    $('#login').modal({
        'show': true,
        'backdrop': 'static',
        'keyboard': false
    });

    // 登录注册切换
    $('#login .switch').on('click', function(){
        if($(this).text() == '注册'){
            $('.form-signin-heading').text('请注册');
            $('.form-signin input[type="text"]').removeClass('hidden');
            $('#login button').text('注册');
            $(this).text('登录');
        }else{
            $('.form-signin-heading').text('请登录');
            $('.form-signin input[type="text"]').addClass('hidden');
            $('#login button').text('登录');
            $(this).text('注册');
        }
    })
</script>
</body>
</html>
